//
//  GKZYUserCenterTableViewCell.m
//  GKZYAid
//
//  Created by lanou3g on 16/3/14.
//  Copyright © 2016年 GKZYAid. All rights reserved.
//

#import "GKZYUserCenterTableViewCell.h"

@implementation GKZYUserCenterTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addAllViews];
    }
    return self;
}

- (void)addAllViews
{
    self.backgroundColor = [UIColor whiteColor];
    
    self.imageViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(self.frame.size.width * 0.02, self.frame.size.height * 0.1, self.frame.size.height * 0.8, self.frame.size.height * 0.8)];
    [self addSubview:self.imageViewIcon];
    self.imageViewIcon.layer.masksToBounds = YES;
    self.imageViewIcon.layer.cornerRadius = 10;
    self.labelContent = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.imageViewIcon.frame) + self.frame.size.width * 0.05, 0, self.frame.size.width * 0.6, self.frame.size.height)];
    self.labelContent.font = [UIFont systemFontOfSize:20.0f];
    [self addSubview:self.labelContent];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageViewIcon.frame = CGRectMake(self.frame.size.width * 0.02, self.frame.size.height * 0.1, self.frame.size.height * 0.8, self.frame.size.height * 0.8);
    self.labelContent.frame = CGRectMake(CGRectGetMaxX(self.imageViewIcon.frame) + self.frame.size.width * 0.05, 0, self.frame.size.width * 0.6, self.frame.size.height);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
